import {
	Http
} from '../utils/request.js'

class userIndex extends Http {
  
  // 绑定推荐用户
  apiBindReferrUser(data) {
    return this.request({
      url: '/bind-referr-user',
      method: 'post',
      data,
      loading: true
    })
  }
  //获取用户手机号
  apigetPhone(data) {
    return this.request({
      url: '/get-phone',
      method: 'post',
      header:{
        'Content-Type':'application/json'
      },
      data,
      loading: true
    })
  }
  apiGetUserInfo(data) {
    return this.request({
      url: '/get-user-info',
      method: 'post',
      data,
      loading: true
    })
  }
  //已邀请用户列表
  apiRecommendList(data){
    return this.request({
      url: '/recommend-list',
      method: 'get',
      data,
      loading: true
    })
  }
  //获取推广海报链接
  apirecommonImg(data){
    return this.request({
      url: '/recommon-img',
      method: 'post',
      data,
      loading: true
    })
  }
  //积分明细
  apiScoreDetail(data){
    return this.request({
      url: '/score-detail',
      method: 'GET',
      data,
      loading: true
    })
  }
  //更新用户信息
  apiUpdateUserInfo(data){
    return this.request({
      url: '/update-user-info',
      method: 'post',
      header:{
        'Content-Type':'application/json'
      },
      data,
      loading: true
    })
  }
  //获取默认地址
  apiUseraddressSetDefualtAddress(data){
    return this.request({
      url: '/useraddress/defualt-address',
      method: 'post',
      data,
      loading: true
    })
  }
  //删除地址
  apiUseraddressSetDelete(data){
    return this.request({
      url: '/useraddress/delete',
      method: 'post',
      data,
      loading: true
    })
  }
  //收货地址列表
  apiUseraddressSetList(data){
    return this.request({
      url: '/useraddress/list',
      method: 'post',
      data,
      loading: true
    })
  }
  //行政地区列表
  apiUseraddressArea(data){
    return this.request({
      url: '/useraddress/area',
      method: 'post',
      data,
      loading: true
    })
  }
  // 地址详情
  apiUseraddressInfo(data){
    return this.request({
      url: '/useraddress/info',
      method: 'post',
      data,
      loading: true
    })
  }
  //保存
  apiUseraddressSetSave(data){
    return this.request({
      url: '/useraddress/save',
      method: 'post',
      data,
      loading: true
    })
  }
  //设置默认地址
  apiUseraddressSetDefualt(data){
    return this.request({
      url: '/useraddress/set-defualt',
      method: 'post',
      data,
      loading: true
    })
  }
  //提现
  apicashoutlogCashOut(data){
    return this.request({
      url: '/cashoutlog/cash-out',
      method: 'post',
      data,
      header:{
        'Content-Type':'application/json'
      },
      loading: true
    })
  }
  //提现规则
  apicashoutlogCashOutRule(data){
    return this.request({
      url: '/cashoutlog/cash-out-rule',
      method: 'post',
      data,
      loading: true
    })
  }
  //提现记录表列表
  apicashoutlogList(data){
    return this.request({
      url: '/cashoutlog/list',
      method: 'post',
      data,
      loading: true
    })
  }
  //快递配送信息
  apiExpressDeliveryInfo(data){
    return this.request({
      url: '/express/delivery-info',
      method: 'post',
      data,
      loading: true
    })
  }
//收藏列表
apiViewcollectList(data){
  return this.request({
    url: '/viewcollect/collect-list',
    method: 'post',
    data,
    loading: true
  })
}
//删除收藏
apiViewcollectDelete(data){
  return this.request({
    url: '/viewcollect/delete-collect',
    method: 'post',
    data,
    loading: true
  })
}
//删除足迹
apiViewcollectDeleteView(data){
  return this.request({
    url: '/viewcollect/delete-view',
    method: 'post',
    data,
    loading: true
  })
}
//保存收藏
apiViewcollectSave(data){
  return this.request({
    url: '/viewcollect/save-collect',
    method: 'post',
    data,
    loading: true
  })
}
//保存足迹
apiViewcollectSaveView(data){
  return this.request({
    url: '/viewcollect/save-view',
    method: 'post',
    data,
    loading: true
  })
}
//足迹列表
apiViewcollectViewList(data){
  return this.request({
    url: '/viewcollect/view-list',
    method: 'post',
    data,
    loading: true
  })
}
//优惠券表列表
apiCouponList(data){
  return this.request({
    url: '/coupon/list',
    method: 'post',
    data,
    loading: true
  })
}
//优惠券详情
apiCouponInfo(data){
  return this.request({
    url: `/coupon/info/${data.id}`,
    method: 'post',
    data,
    loading: true
  })
}
//优惠券活动详情
apiCouponActivityInfo(data){
  return this.request({
    url: `/coupon/activity-info`,
    method: 'get',
    data,
    loading: true
  })
}
//领取优惠券
apiCouponReceive(data){
  return this.request({
    url: `/coupon/receive-coupon`,
    method: 'get',
    data,
    loading: true
  })
}
// 关于火食集
apiAbout(data){
  return this.request({
    url: `/hsj-about`,
    method: 'post',
    data,
    loading: true
  })
}
// 常见问题
apiQuestion(data){
  return this.request({
    url: `/hsj-question`,
    method: 'post',
    data,
    loading: true
  })
}
//销售合同
apiSalesContract(data){
  return this.request({
    url: `/sales-contract`,
    method: 'post',
    data,
    loading: true
  })
}

//用户发票列表
apiUserinvoiceList(data){
  return this.request({
    url: `/userinvoice/list`,
    method: 'post',
    data,
    loading: true
  })
}
//获取默认开票信息
apiUserinvoiceDefualt(data){
  return this.request({
    url: `/userinvoice/defualt-invoice`,
    method: 'post',
    data,
    loading: true
  })
}
//删除开票信息
apiUserinvoiceDelete(data){
  return this.request({
    url: `/userinvoice/delete`,
    method: 'post',
    data,
    loading: true
  })
}
//开票详情
apiUserinvoiceInfo(data){
  return this.request({
    url: `/userinvoice/info`,
    method: 'post',
    data,
    loading: true
  })
}
//保存开票信息
apiUserinvoiceSave(data){
  return this.request({
    url: `/userinvoice/save`,
    method: 'post',
    data,
    loading: true
  })
}
//设置默认开票信息
apiUserinvoiceSetDefualt(data){
  return this.request({
    url: `/userinvoice/set-defualt`,
    method: 'post',
    data,
    loading: true
  })
}
//不同状态订单数
apiorderNum(data){
  return this.request({
    url: `/order-num`,
    method: 'post',
    data,
    loading: true
  })
}
}
export default new userIndex()